/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dnbW.entityW;

import java.util.Comparator;

/**
 *
 * @author Truong Ba Quan
 */
public class SampleValue {
    private Attribute attribute;

    public Attribute getAttribute() {
        return attribute;
    }

    private String value;

    public String getValue() {
        return value;
    }

    private int frequency;

    public int getFrequency() {
        return frequency;
    }

    public void setFrequency(int frequency) {
        this.frequency = frequency;
    }

    public SampleValue(Attribute attribute, String value) {
        this.attribute = attribute;
        this.value = value;
    }
}

class SampleValueFrequencyComparator implements Comparator<SampleValue> {

    @Override
    public int compare(SampleValue o1, SampleValue o2) {
        return o2.getFrequency() - o1.getFrequency();
    }

}
